# Makefile for boot #

# = 用来定义变量，使用时 $(var)
ASM			= nasm
ASMFLAGS	=

TARGET		= boot.bin loader.bin

# 集中定义了3个伪目标
.PHONY : everything clean all		

# 默认开始位置
everything : $(TARGET)

clean :
	rm -f $(TARGET)

all : clean everything

boot.bin : boot.asm ./include/load.inc ./include/fat12hdr.inc
	$(ASM) $(ASMFLAGS) -o $@ $<

loader.bin : loader.asm ./include/load.inc ./include/fat12hdr.inc ./include/pm.inc
	$(ASM) $(ASMFLAGS) -o $@ $<